import React, { Component } from "react";
import { Router, hashHistory, Route, Link } from "react-router";
import PropTypes from "prop-types";
import Login from "../component/login.jsx";
import AdminHome from "../component/adminHome.jsx";
import AddQuestionnaire from "../component/addQuestionnaire.jsx";
import ModifyQuestionnaire from "../component/modifyQuestionnaire.jsx";
import ModifyQuestionnaireDetails from "../component/modifyQuestionnaireDetails.jsx";
import ViewAnswers from "../component/viewAnswers.jsx";
import AnswerDetails from "../component/answerDetails.jsx";
import Welcome from "../component/welcome.jsx";
class MyRouter extends Component {
  render() {
    return (
      <div>
        <Router history={hashHistory}>
          <Route path="/" component={Login} />
          <Route path="/AdminHome" component={AdminHome}>
          <Route path="/AdminHome/Welcome" component={Welcome} />
            <Route path="/AddQuestionnaire" component={AddQuestionnaire} />
            <Route
              path="/ModifyQuestionnaire"
              component={ModifyQuestionnaire}
            />
            <Route path="/ViewAnswers" component={ViewAnswers} />
            <Route path="/AnswerDetails/:id" component={AnswerDetails} />
            <Route path="/ModifyQuestionnaireDetails/:id" component={ModifyQuestionnaireDetails} />
          </Route>
        </Router>
      </div>
    );
  }
}
export default MyRouter;
